package robocup.component.actionfactories;

import robocup.component.ControllerNumbers;
import robocup.component.Synchro;
import robocup.component.actions.ChangeViewModeAction;

/**
 * Factory for creating the view mode action. This implementation refers to the
 * view-mode pattern, which is used to receive a visual info in each cycle.
 */
public class ViewModeActionFactory {

  /**
   * This Method sets the view-quality and angle to a value that will cause the
   * player to receive a visual info each cycle.
   * 
   * @param synchro
   *          the synchro
   * @return - the ChangeViewModeAction
   */
  public static ChangeViewModeAction getAction(final Synchro synchro) {

//    final int offset = synchro.getVIArrivalQuarter();
//
//    if (offset == 0) {
//      return new ChangeViewModeAction(ControllerNumbers.VIEW_QUALITY.HIGH,
//          ControllerNumbers.VIEW_ANGLE.NORMAL);
//    }

    return new ChangeViewModeAction(ControllerNumbers.VIEW_ANGLE.NARROW);
  }
}
